package com.jiyun.jiyunmall.product.dto;

import com.jiyun.jiyunmall.common.valid.SaveGrop;
import com.jiyun.jiyunmall.common.valid.UpdateGrop;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Param;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;


/**
 * 品牌
 *
 * @author boge 71164376@qq.com
 * @since 1.0.0 2022-07-12
 */
@Data
@ApiModel(value = "品牌")
public class BrandDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Null(groups = {SaveGrop.class})
	@NotNull(groups = {UpdateGrop.class})
	@ApiModelProperty(value = "品牌id")
	private Long brandId;

	@NotNull
	@Size(max = 20,min = 2,message = "字符长度有问题")
	@Pattern(regexp = "^[\\u4e00-\\u9fa5_a-zA-Z0-9]+$",message = "请输入中英文字符")
	@ApiModelProperty(value = "品牌名")
	private String name;

	@ApiModelProperty(value = "品牌logo地址")
	private String logo;

	@NotNull
//	@Size(ma+++++++++x = 500,min = 10,message = "字符长度有问题")
	@ApiModelProperty(value = "介绍")
	private String descript;

	@ApiModelProperty(value = "显示状态[0-不显示；1-显示]")
	private Integer showStatus;

	@NotNull
	@Pattern(regexp = "^[a-zA-Z]$",message = "只能是字母")
	@Size(max = 1,min = 1,message = "字符长度有问题")
	@ApiModelProperty(value = "检索首字母")
	private String firstLetter;

	@Pattern(regexp = "^[0-9]+$",message = "排序只能为数字")
	@ApiModelProperty(value = "排序")
	private String sort;



}